package com.sjq.mapper;

import com.sjq.model.entity.ExpertUser;
import com.sjq.model.request.GetUserRequest;
import com.sjq.model.request.UserDto;
import com.sjq.model.entity.User;
import com.sjq.model.request.UserRequest;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * UserMapper
 * @author dolyw.com
 * @date 2021/12/31 14:43
 */
public interface UserMapper extends Mapper<UserDto> {

    int getStatusByAccount(String account);

    int insertUser(User user);

    List<User> getUnAuthorizedUserList();

    int updateStatus(User user);

    UserDto selectById(Integer id);

    int insertExpertClassification(@Param("userId") Long userId, @Param("classificationId") Long classificationId);

    List<String> getRoleById(Long userId);

    List<UserRequest> selectUser(GetUserRequest baseDto);

    List<UserRequest> getExpert(String classification);

    List<UserRequest> getExpertAll();
}
